<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link href="assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="css/style.css"/>
    <link rel="stylesheet" href="assets/css/ace.min.css"/>
    <link rel="stylesheet" href="assets/css/font-awesome.min.css"/>
    <link href="Widget/icheck/icheck.css" rel="stylesheet" type="text/css"/>
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/typeahead-bs2.min.js"></script>
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="assets/layer/layer.js" type="text/javascript"></script>
    <script src="assets/laydate/laydate.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/H-ui.js"></script>
    <script type="text/javascript" src="js/H-ui.admin.js"></script>
    <script src="js/lrtk.js" type="text/javascript"></script>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.js"></script>
    <title>供暖号码</title>
</head>

<body>
<div id="app" class="page-content clearfix">

    <!----------------------------------分类操作------------------------------->
    <div class="border clearfix">
       <span class="l_f">
<!-----------------------添加分类，弹出一个弹窗添加-------------------------->
        <button @click="addHeatingNumber" class="btn btn-warning Order_form"><i class="icon-plus"></i>添加项配置类型</button>
           <a href="javascript:void(0)" id="batchDel" @click.prevent="batchDel" class="btn btn-danger"><i
                   class="icon-trash"></i>批量删除</a>
       </span>

        查找：<input id="sel" placeholder="输入关键字" type="text">
        <button @click="search" class="btn btn_search"><i class="icon-search"></i>供暖号码查询</button>
        <button @click="search1" class="btn btn_search"><i class="icon-search"></i>身份证号查询</button>
        <button @click="search2" class="btn btn_search"><i class="icon-search"></i>户主名查询</button>
        <button @click="search3" class="btn btn_search"><i class="icon-search"></i>地址查询</button>
        <button @click="reset" class="btn btn-danger">重置</button>
        <!--每页显示行数：
        <select @change="initData(1)" v-model="pageSize">
            <option v-for="size in sizes">{{size}}</option>
        </select>-->
    </div>
    <!-----------------------耗材列表------------------->
    <div class="b_products_list clearfix" id="products_list">
        <div id="scrollsidebar" class="left_Treeview">
            <div class="show_btn" id="rightArrow"><span></span></div>
            <div class="widget-box side_content">
                <div class="side_title"><a title="隐藏" class="close_btn"><span></span></a></div>
                <div class="side_list">
                    <div class="widget-header header-color-green2"><h4 class="lighter smaller">供暖号码分类</h4></div>
                    <div class="widget-body">
                        <ul class="b_P_Sort_list">
                            <li><i class="orange icon-folder-close"></i><a href="#">当前页数据({{this.heatingNumbers.length}})</a>
                            </li>

                            <li v-for="heatingNumber,index in heatingNumbers">
                                <i class="icon-file-text grey"></i>
                                <a href="#">{{heatingNumber.householdName}}</a>
                            </li>

                        </ul>

                    </div>
                </div>
            </div>
        </div>
        <!--列表展示-->
        <div class="table_menu_list" id="testIframe">
            <!--显示添加或者修改输入框-->
            <div v-if="showAdd">
                <table>
                    <tr>
                        <td>
                            供暖号码的地址:
                            <!--<select  v-model.trim="pid" @change="provinceCity()"><option  v-for="province in provinces" :value="province.id">{{province.title}}</option></select>
                            <select><option v-for="city in citys">{{city.title}}</option></select>-->
                            <!--<input  v-model.trim="address"type="text">-->

                            <input ref="address" v-model.trim="curHeatingNumber.address" type="text">
                            <span>{{error.address}}</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <!-- @keyup(键盘事件)是按键松开，当指定的按键松开会触发的事件 -->
                            供暖号码:<input ref="number" v-model.trim="curHeatingNumber.number" @keyup="numbers"
                                        type="text">
                            <span>{{error.number}}</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            户主名:<input ref="householdName" v-model.trim="curHeatingNumber.householdName"
                                       @keyup="householdNames" type="text">
                            <span>{{error.householdName}}</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            户主身份证号码:<input ref="householdIdcard" v-model.trim="curHeatingNumber.householdIdcard"
                                           @keyup="householdIdcards" type="text">
                            <span>{{error.householdIdcard}}</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input value="提交" @click="save" type="button">
                            <input @click="backTab" value="返回" type="button">
                        </td>
                    </tr>

                </table>
            </div>
            <div v-if="showTab">
                <table class="table table-striped table-bordered table-hover" id="sample-table">
                    <thead>
                    <tr>
                        <!--:key 当前指向元素的键名-->
                        <th width="25px"><label><input v-model="allChoose" id="chooseAll" type="checkbox" class="ace" :key="pageInfo.pageNum"><span class="lbl"></span></label>
                        </th>
                        <td>序号</td>
                        <td>供暖号码的地址</td>
                        <td>供暖号码</td>
                        <td>户主名</td>
                        <td>户主身份证号</td>
                        <td>添加时间</td>
                        <td>更新时间</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    <tr v-for="heatingNumber,index in heatingNumbers">
                        <td width="25px"><label><input :value="heatingNumber.id" v-model="chooseHeatingNumbers" type="checkbox" class="ace"><span class="lbl"></span></label>
                        </td>
                        <td>{{index+1}}</td>
                        <td>{{heatingNumber.address}}</td>
                        <td>{{heatingNumber.number}}</td>
                        <td>{{heatingNumber.householdName}}</td>
                        <td>{{heatingNumber.householdIdcard}}</td>
                        <!-- heatingNumber.inputTime+.substring(0,10)截取时间格式   例如:2021-05-13-->
                        <td>{{heatingNumber.inputTime.substring(0,10)}}</td>
                        <td>{{heatingNumber.updateTime.substring(0,10)}}</td>
                        <td><input @click="update(index)" type="button" value="修改"><input @click="del(index)" type="button" value="删除"></td>
                    </tr>
                    </tbody>
                </table>

                <div class="row">
                    <div class="col-sm-6">
                        <div class="dataTables_info" id="sample-table_info" role="status" aria-live="polite">
                            第{{pageInfo.pageNum}}/{{pageInfo.pages}} 页，共 {{pageInfo.total}} 条
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="dataTables_paginate paging_bootstrap" id="sample-table_paginate">
                            <ul class="pagination">
                                <li :class="{'disabled':pageInfo.pageNum==1}">
                                    <a href="#" @click="initData(pageInfo.prePage)">上一页</a>
                                </li>

                                <li v-for="i in pageInfo.pages" @click.prevent="initData(i)"
                                    :class="{'active':pageInfo.pageNum==i}">
                                    <a href="#"> {{i}}</a>
                                </li>

                                <li :class="{'disabled':pageInfo.pageNum==pageInfo.pages}">
                                    <a href="#" @click="initData(pageInfo.nextPage)">下一页</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>

<script>
    var app = new Vue({
        el: "#app",
        //数据
        data: {
            //当前页选择状态
            pageCheckAll:[],
            //存放后端的数据
            heatingNumbers: [],
            //存放后端所有省份的数据
            provinces: [],
            //存放后端所有城市的数据
            citys: [],
            //分页数据
            pageInfo: {},
            //绑定复选框
            chooseHeatingNumbers: [],
            //表头的全选复选框默认值
            //allChoose: false,
            //显示所有数据表格
            showTab: true,
            //是否显示添加或者修改输入框
            showAdd: false,
            //存放新增加的数据
            curHeatingNumber: {},
            //修改的索引号
            editIndex: -1,
            //供暖号码表的数据(初始值)
            searchHeatingNumber: {
                id: 0,
                /*//动态sql不需要给初始值
                number:'',
                householdIdcard:'',
                householdName:'',
                address:''*/
            },
            //格式判断的初始值(数据)
            error: {
                address: "",
                number: "",
                householdName: "",
                householdIdcard: ""
            },
            //省份对象初始化
            province: {},
            //地址初始化
            address: "",
            //选择的省份id
            pid: '',
        },
        //created 创建
        created: function () {
            this.initData(1);
            this.initDataProvince();
            /*this.initDataCity();*/
        },
        //计算属性
        computed:{
            allChoose:{
                //设置记录当前页选择的状态
                set:function(val){
                    //记录当前页选择的状态
                    this.pageCheckAll[this.pageInfo.pageNum-1] = val;
                    if(!val){
                        //清空绑定复选框
                        this.chooseHeatingNumbers = [];
                    }
                    else{
                        this.heatingNumbers.forEach(heatingNumber => this.chooseHeatingNumbers.push(heatingNumber.id));
                    }
                },
                //获得记录当前页选择的状态
                get:function(){
                    if(this.pageCheckAll[this.pageInfo.pageNum-1]==undefined){
                        //当前页的选择状态为数据不选择
                        this.pageCheckAll[this.pageInfo.pageNum-1] = false;
                    }
                   /* console.log(this.pageInfo.pageNum+":"+this.pageCheckAll[this.pageInfo.pageNum-1]);*/
                    return this.pageCheckAll[this.pageInfo.pageNum-1];
                }
            }
        },
        //方法
        methods: {
            //查询所有的配置的方法(初始化)
            initData: function (pageNum) {
                //表头的全选复选框默认值
                /*this.allChoose = false;*/
                this.showTab = true;//显示所有数据表格
                this.showAdd = false;//是否显示添加或者修改输入框
                axios.post("http://localhost:8080/manage/heatingNumber?pageNum=" + pageNum, this.searchHeatingNumber)
                    .then(res => {
                        /*res.data.data   res.第一个data代表的是从后台返回的一个整体数据;
                        第二个data代表的是从后台返回的那个整体数据里的一个数据。*/
                        this.heatingNumbers = res.data.data.list;
                        this.pageInfo = res.data.data;

                        //不是表头的全选复选框默认值
                        if(!this.allChoose){
                            //清空绑定复选框
                            this.chooseHeatingNumbers = [];
                        }
                        else{
                            this.heatingNumbers.forEach(heatingNumber => this.chooseHeatingNumbers.push(heatingNumber.id));
                        }

                    });//请求成功
                //清空供暖号码表的数据
                this.searchHeatingNumber = {id: 0};

            },
            //查询所有省份的方法(初始化)
            initDataProvince: function () {
                axios.get("http://localhost:8080/manage/heatingNumber")
                    .then(res => {
                        /*res.data.data   res.第一个data代表的是从后台返回的一个整体数据;
                        第二个data代表的是从后台返回的那个整体数据里的一个数据。*/
                        this.provinces = res.data.data;
                        //console.log(res.data.data)
                    });//请求成功

            },
            //重置功能的方法
            reset: function () {
                this.searchHeatingNumber.id = 0;
                this.initData(1);
            },
            //根据省份id查询相对应的城市
            provinceCity: function () {

                axios.get("http://localhost:8080/manage/heatingNumberCity?id=" + this.pid)
                    .then(res => {
                        console.log(this.id);
                        /*res.data.data   res.第一个data代表的是从后台返回的一个整体数据;
                        第二个data代表的是从后台返回的那个整体数据里的一个数据。*/
                        this.citys = res.data.data;
                        console.log(res.data.data);

                    });//请求成功

                /*this.provinces[id]=this.citys;*/
            },
            //根据供暖号码进行查询的方法
            search: function () {
                this.searchHeatingNumber.number = document.getElementById("sel").value;
                this.initData(1);

            },
            //根据户主身份证号进行查询的方法
            search1: function () {
                this.searchHeatingNumber.householdIdcard = document.getElementById("sel").value;
                this.initData(1);

            },
            //根据户主名进行查询的方法
            search2: function () {
                this.searchHeatingNumber.householdName = document.getElementById("sel").value;
                this.initData(1);

            },
            //根据供暖号码绑定的地址进行查询的方法
            search3: function () {
                this.searchHeatingNumber.address = document.getElementById("sel").value;
                this.initData(1);

            },
            //添加供暖号码信息的方法
            addHeatingNumber: function () {
                //是否显示添加或者修改输入框
                this.showAdd = true;
                //显示所有数据表格
                this.showTab = false;
            },
            //返回类型功能的方法
            backTab: function () {
                //是否显示添加或者修改输入框
                this.showAdd = false;
                //显示所有数据表格
                this.showTab = true;
                //清空存放新增加的数据
                this.curHeatingNumber = {};
                //清空供暖号码的提示
                this.error.number = "";
                //清空户主名的提示
                this.error.householdName = "";
                //清空身份证号的提示
                this.error.householdIdcard = "";
            },
            //供暖号码提示验证
            numbers: function () {
                console.log("change" + this.curHeatingNumber.number);
                //供暖号码的正则表达式
                var numberFormat = /^[\b0-9]{6,20}$/;
                //供暖号码格式验证
                if (this.curHeatingNumber.number == undefined || this.curHeatingNumber.number == "") {
                    this.error.number = "供暖号码不能为空";
                    //供暖号码输入框获得焦点
                    this.$refs.number.focus();
                    return;
                } else if (!numberFormat.test(this.curHeatingNumber.number)) {
                    this.error.number = "请输入正确的供暖号码";
                    //供暖号码输入框获得焦点
                    this.$refs.number.focus();
                    return;
                } else {
                    this.error.number = "";
                }
            },
            //户主名提示验证
            householdNames: function () {
                //户主名的正则表达式
                var householdNameFormat = /^[\u4e00-\u9fa5]{2,50}$/;
                if (this.curHeatingNumber.householdName == undefined || this.curHeatingNumber.householdName == "") {
                    this.error.householdName = "户主名不能为空";
                    //户主名输入框获得焦点
                    this.$refs.householdName.focus();
                    return;
                } else if (!householdNameFormat.test(this.curHeatingNumber.householdName)) {
                    this.error.householdName = "请输入正确的户主名";
                    //户主名输入框获得焦点
                    this.$refs.householdName.focus();
                    return;
                } else {
                    this.error.householdName = "";
                }
            },
            //户主身份证号码提示验证
            householdIdcards: function () {
                //身份证号码的正则表达式
                var householdIdcardFormat = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
                //身份证号码格式验证
                if (this.curHeatingNumber.householdIdcard == undefined || this.curHeatingNumber.householdIdcard == "") {
                    this.error.householdIdcard = "身份证号码不能为空";
                    //身份证号码输入框获得焦点
                    this.$refs.householdIdcard.focus();
                    return;
                } else if (!householdIdcardFormat.test(this.curHeatingNumber.householdIdcard)) {
                    this.error.householdIdcard = "请输入正确的身份证号码";
                    //身份证号码输入框获得焦点
                    this.$refs.householdIdcard.focus();
                    return;
                } else {
                    this.error.householdIdcard = "";
                }
            },
            //提交保存功能的输入框的确定按钮(添加或者修改)的方法
            save: function () {
                //修改功能的输入框的确定按钮
                if (this.curHeatingNumber.id) {
                    //获得当前的编辑对象
                    var curHeatingNumber = JSON.parse(JSON.stringify(this.curHeatingNumber));
                    //splice对数组从某个索引位置的开始;this表示该方法所属的对象
                    this.heatingNumbers.splice(this.editIndex, 1, curHeatingNumber);
                } else//添加功能的输入框的确定按钮
                {
                    //push就是将新数据放入到一个新的list集合里面
                    this.heatingNumbers.push(JSON.parse(JSON.stringify(this.curHeatingNumber)));
                }
                /* //清空当前编辑对象;{}代表对象
                 this.curHeatingNumber = {};
                 //不显示输入框  添加或者修改
                 this.showAdd = false;
                 //修改的索引号,editIndex=-1表示取消编辑状态
                 this.editIndex = -1;*/
            },
            //根据序号对供暖号码表的信息进行修改的方法
            update: function (index) {
                //修改索引号
                this.editIndex = index;
                //显示输入框为true
                this.showAdd = true;
                //不显示所有数据表格
                this.showTab = false;
                //修改当前的编辑对象
                this.curHeatingNumber = JSON.parse(JSON.stringify(this.heatingNumbers[index]));
            },
            //提交保存功能的方法
            save: function () {
                //供暖号码的正则表达式
                var numberFormat = /^[\b0-9]{6,20}$/;
                //户主名的正则表达式
                var householdNameFormat = /^[\u4e00-\u9fa5]{2,50}$/;
                //身份证号码的正则表达式
                var householdIdcardFormat = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
                //保存通过序号对供暖号码表进行修改功能的数据
                if (this.curHeatingNumber.id) {
                    //供暖号码格式验证
                    if (this.curHeatingNumber.number == undefined || this.curHeatingNumber.number == "") {
                        this.error.number = "供暖号码不能为空";
                        //供暖号码输入框获得焦点
                        this.$refs.number.focus();
                        return;
                    } else if (!numberFormat.test(this.curHeatingNumber.number)) {
                        this.error.number = "请输入正确的供暖号码";
                        //供暖号码输入框获得焦点
                        this.$refs.number.focus();
                        return;
                    } else {
                        this.error.number = "";
                    }

                    //户主名格式验证
                    if (this.curHeatingNumber.householdName == undefined || this.curHeatingNumber.householdName == "") {
                        this.error.householdName = "户主名不能为空";
                        //户主名输入框获得焦点
                        this.$refs.householdName.focus();
                        return;
                    } else if (!householdNameFormat.test(this.curHeatingNumber.householdName)) {
                        this.error.householdName = "请输入正确的户主名";
                        //户主名输入框获得焦点
                        this.$refs.householdName.focus();
                        return;
                    } else {
                        this.error.householdName = "";
                    }

                    //身份证号码格式验证
                    if (this.curHeatingNumber.householdIdcard == undefined || this.curHeatingNumber.householdIdcard == "") {
                        this.error.householdIdcard = "身份证号码不能为空";
                        //身份证号码输入框获得焦点
                        this.$refs.householdIdcard.focus();
                        return;
                    } else if (!householdIdcardFormat.test(this.curHeatingNumber.householdIdcard)) {
                        this.error.householdIdcard = "请输入正确的身份证号码";
                        //身份证号码输入框获得焦点
                        this.$refs.householdIdcard.focus();
                        return;
                    } else {
                        this.error.householdIdcard = "";
                    }
                    axios.post("http://localhost:8080/manage/updateHeatingNumber", this.curHeatingNumber)
                        .then(
                            res => {
                                this.backTab();
                                //保存修改的新数据
                                if (!this.curHeatingNumber.id) {
                                    //点击提交按钮,进入点击修改数据的页面
                                    this.initData(this.pageInfo.pageNum);
                                }
                                this.curHeatingNumber = {};
                            });//请求成功

                } else//保存对供暖号码表进行添加功能的数据
                {
                    //供暖号码格式验证
                    if (this.curHeatingNumber.number == undefined || this.curHeatingNumber.number == "") {
                        this.error.number = "供暖号码不能为空";
                        //供暖号码输入框获得焦点
                        this.$refs.number.focus();
                        return;
                    } else if (!numberFormat.test(this.curHeatingNumber.number)) {
                        this.error.number = "请输入正确的供暖号码";
                        //供暖号码输入框获得焦点
                        this.$refs.number.focus();
                        return;
                    } else {
                        this.error.number = "";
                    }

                    //户主名格式验证
                    if (this.curHeatingNumber.householdName == undefined || this.curHeatingNumber.householdName == "") {
                        this.error.householdName = "户主名不能为空";
                        //户主名输入框获得焦点
                        this.$refs.householdName.focus();
                        return;
                    } else if (!householdNameFormat.test(this.curHeatingNumber.householdName)) {
                        this.error.householdName = "请输入正确的户主名";
                        //户主名输入框获得焦点
                        this.$refs.householdName.focus();
                        return;
                    } else {
                        this.error.householdName = "";
                    }

                    //身份证号码格式验证
                    if (this.curHeatingNumber.householdIdcard == undefined || this.curHeatingNumber.householdIdcard == "") {
                        this.error.householdIdcard = "身份证号码不能为空";
                        //身份证号码输入框获得焦点
                        this.$refs.householdIdcard.focus();
                        return;
                    } else if (!householdIdcardFormat.test(this.curHeatingNumber.householdIdcard)) {
                        this.error.householdIdcard = "请输入正确的身份证号码";
                        //身份证号码输入框获得焦点
                        this.$refs.householdIdcard.focus();
                        return;
                    } else {
                        this.error.householdIdcard = "";
                    }

                    axios.post("http://localhost:8080/manage/addHeatingNumber", this.curHeatingNumber)
                        .then(res => {
                            this.backTab();
                            //保存添加的新数据
                            if (!this.curHeatingNumber.id) {
                                /*this.initData();*/
                                this.initData(this.pageInfo.pageNum);
                            }
                            //清空存放新增加的数据
                            this.curHeatingNumber = {};
                        });//请求成功
                }

            },
            //根据供暖号码id对供暖号码的信息进行删除的方法
            del: function (index) {
                axios.post("http://localhost:8080/manage/deleteHeatingNumber/" + this.heatingNumbers[index].id)
                    .then(res => {
                        //splice对数组从某个索引位置的开始;this表示该方法所属的对象
                        this.heatingNumbers.splice(index, 1);
                        this.initData(this.pageInfo.pageNum);
                    })
            },
            //批量删除功能的方法
            batchDel: function () {
                if (this.chooseHeatingNumbers.length == 0) {
                    return;
                }
                axios.post("http://localhost:8080/manage/deleteBatch", this.chooseHeatingNumbers)
                    .then(res => {
                        //只保留没有删除的
                        this.heatingNumbers = this.heatingNumbers.filter(heatingNumber => {
                            if (!this.chooseHeatingNumbers.includes(heatingNumber.id)) {
                                return heatingNumber;
                            }

                        });
                        this.initData(this.pageInfo.pageNum);
                    })

                //清空表头的全选复选框
                this.allChoose="";
                document.getElementById("chooseAll").checked=false;
                //清空绑定复选框
                this.chooseHeatingNumbers = [];

            }

        }
    });
</script>


<script type="text/javascript">
    //数据
    jQuery(function ($) {


        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                .each(function () {
                    this.checked = that.checked;
                    $(this).closest('tr').toggleClass('selected');
                });

        });


        $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});

        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();

            var off2 = $source.offset();
            var w2 = $source.width();

            if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
            return 'left';
        }
    });
    //图层隐藏限时参数
    $(function () {
        $("#products_list").fix({
            float: 'left',
            //minStatue : true,
            skin: 'green',
            durationTime: false,
            stylewidth: '220',
            spacingw: 30,//设置隐藏时的距离
            spacingh: 260,//设置显示时间距
        });
    });
    //初始化宽度、高度
    $(".widget-box").height($(window).height() - 215);
    $(".table_menu_list").width($(window).width() - 260);
    $(".table_menu_list").height($(window).height() - 215);
    //当文档窗口发生改变时 触发
    $(window).resize(function () {
        $(".widget-box").height($(window).height() - 215);
        $(".table_menu_list").width($(window).width() - 260);
        $(".table_menu_list").height($(window).height() - 215);
    });

    /*-删除*/
    function member_del(obj, id) {
        layer.confirm('确认要删除吗？', function (index) {
            $(obj).parents("tr").remove();
            layer.msg('已删除!', {icon: 1, time: 1000});
        });
    }

    //面包屑返回值
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.iframeAuto(index);
    $('.Order_form').on('click', function () {
        var cname = $(this).attr("title");
        var chref = $(this).attr("href");
        var cnames = parent.$('.Current_page').html();
        var herf = parent.$("#iframe").attr("src");
        parent.$('#parentIfour').html(cname);
        parent.$('#iframe').attr("src", chref).ready();
        ;
        parent.$('#parentIfour').css("display", "inline-block");
        parent.$('.parentIframe').attr("name", herf).css({"color": "#4c8fbd", "cursor": "pointer"});
        parent.layer.close(index);

    });
</script>
